<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateWechatOffiaccountQrcodes extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::dropIfExists('wechat_offiaccount_qrcodes');
        Schema::create('wechat_offiaccount_qrcodes', function (Blueprint $table) {
            $table->id();
            $table->string('title',20);
            $table->string('type',20)->default('forever');
            $table->string('key',20);
            $table->string('ticket',255)->nullable()->default('');
            $table->string('url',255)->nullable()->default('');
            $table->timestamp('expired_at')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wechat_offiaccount_qrcodes');
    }
}
